using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAOLayer;
using System.Data;

namespace BUSLayer
{
    public class PhongBus
    {
        public static void Them(PhongDto p)
        {
            PhongDao.Them(p);
        }
        public static DataTable LayDanhSachPhongTheoMa(int ma)
        {
            DataTable dt = new DataTable();
            dt = PhongDao.LayDanhSachPhongTheoMa(ma);
            return dt;
        }
        public static List<string> LayDanhSachTenPhong()
        {
            List<string> list = PhongDao.LayDanhSachTenPhong() ;
            return list;
        }
        public static DataTable LayDanhSachPhong()
        {
            //Kiem tra Business Rule neu co
            DataTable dt = new DataTable();
            dt = PhongDao.LayDanhSachPhong();
            return dt;
        }
        public static PhongDto LayMotPhong(int ma)
        {
            PhongDto phong = new PhongDto();
            phong = PhongDao.LayMotPhong(ma);
            return phong;
        }
        public static void Xoa(int MaPhong)
        {
            PhongDao.Xoa(MaPhong);
        }
        public static void CapNhatXuongCSDL(PhongDto p)
        {
            PhongDao.CapNhatXuongCSDL(p);
        }
       
        public DataTable TimKiemPhong(PhongCrt p)
        {
            DataTable dt = new DataTable();
            PhongDao pDao = new PhongDao();
            dt = pDao.TimKiemPhong(p) ;
            return dt;

        }
        public static DataTable LayToanBoPhong()
        {
            DataTable dt = PhongDao.LayToanBoPhong();
            return dt;


        }
       

    }
}
